<?php
	foreach($posts as $post){
		if($post['Post']['reblog']){
			$reblog = "rebloged";
		}else{
			$reblog = "reblog";
		}
		if($post['Post']['like']){
			$favor = "favored";
		}else{
			$favor = "favor";
		}
?>
	<div class="item">
		<div class="pic">
			<a href="#">
				<img src="/dorimeme/app/webroot/img/usericon/<?php echo $post['Post']['username'] ?>.jpg" />						
			</a>
		</div><!--End pic-->
		<div class="item-content">
			<div class="operation">
				<a class="note-btn" href="#"><?php echo $post['Post']['response_count'] ?> notes</a>
				<a class="<?php echo $reblog ?>" href="#">reblog</a>
				<a class="<?php echo $favor ?>" href="#">favor</a>
			</div><!--End operation-->
			<p class="author">
				<a href="#"><?php echo $post['Post']['username'] ?>:</a>
			</p><!--End author-->
			<p class="text-content">
				<?php echo $post['Post']['excerpt']; ?>
			</p><!--End text-content-->
			<div class="tag">
				<?php
					foreach($post['Post']['tags'] as $tag){
						echo '<a href="#">#'.$tag['name'].'</a>';
					}
				?>
			</div>
			<div class="clear"></div>
			<div class="noteOuter" style="display:none;">
				<ol class="note">
					<li>
						<a href="#"><img src="/dorimeme/app/webroot/img/usericon/profile.jpg" align="absmiddle" /></a>
						<span class="author"><a href="">somebody: </a>liked this</span>
						<a class="block" href="#">block</a>						
					</li>
				</ol>
				<div class="noteOperationOuter">
					<div class="status">Loading...</div>
					<div class="hideLink">
						<a class="hide" href="#">
							Hide notes
						</a>
					</div>
				</div><!-- End noteOperationOuter -->
			</div><!-- End noteOuter -->
		</div><!--End item-content-->
		<div class="clear"></div>
	</div><!--End item-->
<?php		
	}
?>